package com.wn.ticket.web;

import com.wn.ticket.common.ResponseEntity;
import com.wn.ticket.entity.Perform;
import com.wn.ticket.entity.User;
import com.wn.ticket.service.PerformService;
import com.wn.ticket.service.UserArtistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 系统消息  （购票/演出时间、关注演员近期表演）
 * @author 杜昭进
 * date: 2022/9/2
 */
@RestController
@RequestMapping("/front/Mynews")
public class SystemMessageController {
    @Autowired
    private UserArtistService userArtistService;

    @RequestMapping("/perform")
    public ResponseEntity getAll(@RequestBody User user){
        //查询艺人，带出演出
        List<User> users = userArtistService.getAllByUserId(user.getId());
        return new ResponseEntity(users);
    }
}
